<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%>
<%@ include file="../include/taglib.inc"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>List</title>
<%@ include file="../include/res.inc"%>
<style type="text/css">
table {
	border: 1px solid black;
	border-collapse: collapse;
	width: 500px;
}

table thead tr th {
	border: 1px solid black;
	padding: 3px;
	background-color: #cccccc;
}

table tbody tr td {
	border: 1px solid black;
	padding: 3px;
}
</style>
</head>
<body>
    List.......
    <s:form action="test_list" namespace="/template">
        <table>
            <tr>
                <td>Name</td>
                <td><s:textfield name="model.name" /></td>
            </tr>
            <tr>
                <td>Age</td>
                <td><s:textfield name="model.age" /></td>
            </tr>
        </table>
        <s:submit value="查询" />
    </s:form>
    <br />
    <s:a href="test_toadd.do">添加</s:a>
    <table>
        <thead>
            <tr>
                <th>id</th>
                <th>name</th>
                <th>age</th>
                <th>operation</th>
            </tr>
        </thead>
        <tbody>
            <s:iterator value="%{pageModel.data}" id="row">
                <tr>
                    <td>${row.id}</td>
                    <td>${row.name}</td>
                    <td>${row.age}</td>
                    <td><s:a href="test_edit.do?id=%{#row.id}">修改</s:a> &nbsp; <s:a
                            href="test_delete.do?id=%{#row.id}">删除</s:a></td>
                </tr>
            </s:iterator>
        </tbody>
    </table>
    <%@ include file="../include/pageNav.inc"%>
</body>
</html>